<%@ page contentType="text/html;charset=utf-8" language="java"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@include file="./common/base.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户中心_约导游</title>
<!--css-->
<link rel="stylesheet" type="text/css" href="css/wutongstyle.css">
</head>

<body>
<!--head begin-->
<%@ include  file="./common/header.jsp"%>
<!--nav end--> 
<!--content begin-->
<div class="wt_content">
  <dl class="yuedaoyou">
	<%@ include  file="./common/header2.jsp"%><dd>
    <dd>
      <div class="daoyou_info clearfix">
        <div class="xx_box">
          <div class="tainfobox yonghu">
            <h3 id="tuan"><i class="i_co"></i>发布站内短信</h3>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="biaodan">
              <tr>
                <td class="title">收件人：</td>
                <td><input type="text" value="" id="nameId" disabled>
                    <input type="hidden" value="" id="userNameId" disabled>
                  <!--  <font>请填写会员名</font>--></td>
              </tr>
              <tr>
                <td class="title">消息内容：</td>
                <td><textarea id="messageId" style="word-wrap:break-word; word-break:break-all;" name="" cols="" rows="" style="height:100px;"></textarea></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td><button type="button" value="确认" onclick="sendMsg()">确认</button></td>
              </tr>
            </table>
          </div>
        </div>
        <div class="zp"><img id="headImgId" src="" width="185" height="185" />
          <div class="tel">
            <h4>快捷菜单</h4>
            <ul class="quick">
                   <li><a href="lxslogin_1.jsp">发布新团信息</a></li>
              <li><a href="lxslogin.jsp" >团信息列表</a></li>
              <li><a href="lxslogin_2.jsp" >新发团信息</a></li>
              <li><a href="lxslogin_3.jsp" >已申请信息</a></li>
              <li><a href="lxslogin_4.jsp" >已确认信息</a></li>
              <li><a href="lxslogin_6.jsp" >已发团信息</a></li>
              <li><a href="lxslogin_5.jsp">我的资料</a></li>
              <li><a href="lxslogin_7.jsp" class="on">站内短信列表</a></li>
            </ul>
          </div>
        </div>
      </div>
    </dd>
  </dl>
</div>
<!--content end--> 
<!--footer begin-->
<%@ include  file="./common/footer.jsp"%>
<!--footer end-->
</body>
<script type="text/javascript">
var recUserName = request("recUserName");
var recName= unescape(request("recName"))
$(function(){
	$("#headImgId").attr("src",imgDomain+loginUserPhoto);
	$("#userNameId").val(recUserName);
	$("#nameId").val(recName);
	
});
function sendMsg() {
	var objp= "{\"msgtype\":"+3+","+
				"\"recUserName\":\""+$("#userNameId").val()+"\","+
			    "\"message\":\""+escape($("#messageId").val())+"\""+
			    "}";
	 $.ajax({
		  url: '${path}/core/sendLetter',
		  type: 'POST',
		  timeout: 30000,
		  cache : false,
	      data :objp,
	      async: false,
	      dataType:"json",      
         contentType:"application/json",   
	     // contentType: "application/json; charset=utf-8",
		  success:function(msg){
			  alert("ok");
		  },
		   failure:function(msg){
			   alert(eval('('+msg.responseText+')').error_text);
		   		
		   },
		   error:function(msg){
			   alert(eval('('+msg.responseText+')').error_text); 
		   }
	});
}

function formatLetterList(dataList) {
	var ulDiv =$("#letterListId");
		ulDiv.empty();
		for(var k=0;k<dataList.length;k++) {
			ulDiv.append("<li>"+
				            "<h4><span>"+dataList[k].ctime+"</span>发件会员："+dataList[k].sendName+"</h4>"+
				            "<pre>"+dataList[k].message+"</pre>"+
				            "<div class=\"ctrl\"><a href=\"dylogin_4_huifu.jsp?messageId="+dataList[k].id+"\">回复</a>|<a href=\"javascript:;\">删除</a></div>"+
				          "</li>");
		}
}








</script>
</html>
